// logs.js
const util = require("../../utils/util.js");

Page({
  data: {
    imgUrls: [
      " https://img2.baidu.com/it/u=1395980100,2999837177&fm=253&fmt=auto&app=120&f=JPEG",
      " https://img2.baidu.com/it/u=1395980100,2999837177&fm=253&fmt=auto&app=120&f=JPEG",
      " https://img2.baidu.com/it/u=1395980100,2999837177&fm=253&fmt=auto&app=120&f=JPEG",
      " https://img2.baidu.com/it/u=1395980100,2999837177&fm=253&fmt=auto&app=120&f=JPEG",
      "",
      "",
    ],
    indicatorDots: false,
    autoplay: false,
    interval: 5000,
    duration: 1000,

    swiperIndex: 0, // 第一次加载默认第一张图片选中
  },
  // 方法

  onLoad() {
    let that = this;

    this.setData({
      logs: (wx.getStorageSync("logs") || []).map((log) => {
        return {
          date: util.formatTime(new Date(log)),
          timeStamp: log,
        };
      }),
    });
  },
});
